QT += network widgets

TARGET = DelayDeviceSDK
TEMPLATE = lib
CONFIG += plugin

# 启用C++11
CONFIG += c++11

DEFINES += QT_DEPRECATED_WARNINGS
# 确保Qt插件元数据被正确处理
QMAKE_CXXFLAGS += -fvisibility=hidden

# 输出到主程序的SDK目录（根据调试/发布模式 + 32/64位架构区分路径）
contains(CONFIG, debug) {
    # 调试模式路径
    contains(QMAKE_HOST.arch, i386) {
        # 32位架构
        DESTDIR = ../../build/debug/x86/SDK
    } else {
        # 64位架构（兼容x86_64/amd64等）
        DESTDIR = ../../build/debug/x64/SDK
        LIBS += -L$$PWD/../../../SDK/dll_pkg/ -lDelayCamerDevice
        QMAKE_POST_LINK = cmd /C copy /y "$$shell_path($$PWD/../../../SDK/dll_pkg/DelayDevice.dll)" "$$shell_path($$DESTDIR/../DelayDevice.dll)" && copy /y "$$shell_path($$PWD/../../../SDK/dll_pkg/DelayCamerDevice.dll)" "$$shell_path($$DESTDIR/../DelayCamerDevice.dll)"
    }
} else {
    # 发布模式路径
    contains(QMAKE_HOST.arch, i386) {
        # 32位架构
        DESTDIR = ../../build/release/x86/SDK
    } else {
        # 64位架构
        DESTDIR = ../../build/release/x64/SDK.dll
        LIBS += -L$$PWD/../../../SDK/dll_pkg/ -lDelayCamerDevice
        QMAKE_POST_LINK = cmd /C copy /y "$$shell_path($$PWD/../../../SDK/dll_pkg/DelayDevice.dll)" "$$shell_path($$DESTDIR/../DelayDevice.dll)" && copy /y "$$shell_path($$PWD/../../../SDK/dll_pkg/DelayCamerDevice.dll)" "$$shell_path($$DESTDIR/../DelayCamerDevice.dll)"
    }
}

INCLUDEPATH += ../../DeviceManagementPlugin \
               ../../../SDK/dll_pkg

DEPENDPATH += $$PWD/../../../SDK/dll_pkg

SOURCES += \
    DelayDevice.cpp \
    DelayDeviceParamsSet.cpp \
    DelayDeviceSDK.cpp \
    DelayQuickParametesSet.cpp

HEADERS += \
    DelayDevice.h \
    DelayDeviceParamsSet.h \
    DelayDeviceSDK.h \
    ../../DeviceManagementPlugin/SDKInterface.h \
    ../../DeviceManagementPlugin/ControlModuleSDKInterface.h \
    DelayQuickParametesSet.h

FORMS += \
    DelayDeviceParamsSet.ui \
    DelayQuickParametesSet.ui


